package com.file.system.entity.business;


import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.file.system.entity.basic.WebBasic;
import com.file.system.plugin.dict.Dict;
import com.file.system.plugin.validated.SQLInjectionValidation;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.validation.groups.Default;
import java.io.Serializable;
import java.time.LocalDate;


/**
 * 器具
 *
 * @author jch
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BusUtensil extends WebBasic implements Serializable {

    private static final long serialVersionUID = 1L;


    //新增
    public interface add extends Default {
    }

    //修改
    public interface update extends Default {
    }

    /**
     * 主键
     */
    @NotNull(groups = {update.class}, message = "主键不能为空")
    @Min(value = 1, message = "id长度最小1")
    private Long id;
    /**
     * 序号
     */
    @SQLInjectionValidation(fieldName = "序号")
    private String serialNumber;
    /**
     * 器具名称
     */
    @NotEmpty(groups = {update.class, add.class}, message = "器具名称不能为空")
    @SQLInjectionValidation(fieldName = "器具名称")
    private String sampleName;
    /**
     * 型号规格
     */
    @SQLInjectionValidation(fieldName = "型号规格")
    private String specModel;

    /**
     * 制造厂家
     */
    @SQLInjectionValidation(fieldName = "制造厂家")
    private String applianceManufacturer;
    /**
     * 出厂编号
     */
    @SQLInjectionValidation(fieldName = "出厂编号")
    private String sampleFactoryNumber;
    /**
     * 出厂日期
     */
    @SQLInjectionValidation(fieldName = "出厂日期")
    private String dateOfProduction;

    /**
     * 检定需时
     */
    @SQLInjectionValidation(fieldName = "检定需时")
    private String verificationTimeRequired;

    /**
     * 商定完成日期
     */
    @SQLInjectionValidation(fieldName = "商定完成日期")
    private String agreedCompletionDate;

    /**
     * 证书编号
     */
    private String certificateNo;

    /**
     * 检定/校准依据
     */
    private String calibrationBasis;

    /**
     * 主检人
     */
    private String principalInspector;

    /**
     * 审核人
     */
    private String reviewedBy;

    /**
     * 签发人
     */
    private String issuer;

    /**
     * 签发日期
     */
    private String issuerDate;
    /**
     * 标准收费
     */
    private String standardCharges;
    /**
     * 登记号（数量）
     */
    private Integer sampleNo;
    /**
     * 附件明细
     */
    @SQLInjectionValidation(fieldName = "附件明细")
    private String fj;
    /**
     * 外观说明(字典)（字典）
     */
    @Dict("wgsm")
    @SQLInjectionValidation(fieldName = "外观说明(字典)")
    private String dictWgsm;
    /**
     * 技术指标
     */
    @SQLInjectionValidation(fieldName = "技术指标")
    private String sampleTechFeature;
    /**
     * 检测类型(字典)（字典）
     */
    @NotEmpty(groups = {update.class, add.class}, message = "检测类型(字典)不能为空")
    @Dict("reportType")
    @SQLInjectionValidation(fieldName = "检测类型(字典)")
    private String dictReportType;
    /**
     * 检测费用
     */
    @SQLInjectionValidation(fieldName = "检测费用")
    private String testingCosts;
    /**
     * 承检科室(字典)（字典）
     */
    @NotEmpty(groups = {update.class, add.class}, message = "承检科室(字典)不能为空")
    @Dict("testDepartment")
    @SQLInjectionValidation(fieldName = "承检科室(字典)")
    private String dictTestDepartment;
    /**
     * 预计完成日期
     */
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate wantCompleteDate;
    /**
     * 备注
     */
    @SQLInjectionValidation(fieldName = "备注")
    private String description;
    /**
     * 数量
     */
    private Integer number;
    /**
     * 校准证书是否需要给出校准周期（字典）（字典）
     */
    @Dict("jzzq")
    @SQLInjectionValidation(fieldName = "校准证书是否需要给出校准周期（字典）")
    private String dictJzzq;
    /**
     * 校准证书是否需要给出合格判定（字典）（字典）
     */
    @Dict("jzpd")
    private String dictJzpd;
    /**
     * 其他要求
     */
    @SQLInjectionValidation(fieldName = "其他要求")
    private String otherRequirement;
    /**
     * 计量器具领取人
     */
    @SQLInjectionValidation(fieldName = "计量器具领取人")
    private String receiverOfMeasuringInstruments;
    /**
     * 计量器具领取日期
     */
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate receiverOfMeasuringInstrumentsDate;
    /**
     * 证书领取人
     */
    @SQLInjectionValidation(fieldName = "证书领取人")
    private String certificateRecipient;
    /**
     * 证书领取日期
     */
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate certificateRecipientDate;
    /**
     * 器具订单id
     */
    @NotNull(groups = {add.class, update.class}, message = "器具订单id不能为空")
    private Long fkIndentId;

    /**
     * 器具种类
     */
    @Dict("equipmentType")
    private String dictEquipmentType;
    /**
     * 数量单位
     */
    @Dict("AAUs")
    private String dictAAUs;
    /**
     * 强制检定
     */
    @Dict("verification")
    private String dictVerification;
    /**
     * 器具状态
     */
    @Dict("applianceStatus")
    private String dictApplianceStatus;
    /**
     * 法定类别
     */
    @Dict("legalCategory")
    private String dictLegalCategory;
    /**
     * 取证书方式
     */
    @Dict("certificateMethod")
    private String dictCertificateMethod;
    /**
     * 专业
     */
    @Dict("speciality")
    private String dictSpeciality;

    private String dictCheckType;
}
